package com.zhiqingchun.web.login;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/logout.html")
public class LogoutController {

	@RequestMapping(method = RequestMethod.GET)
	public String logout(ModelMap modelMap,HttpServletRequest request, HttpServletResponse response) {
		request.getSession().setAttribute("user", null);
		return "redirect:default.html";
	}
}
